<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.PreparedStatement"%>
<%@page import="java.sql.Connection"%>
<%@page import="java.sql.DriverManager"%>

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<jsp:useBean id="bean" class="connect.Login" scope="page"/>
<jsp:setProperty property="*" name="bean"/>

<%
if(bean.login()){
	session.setAttribute("mid",bean.getMid());
%><script>location.href='index.jsp';</script><% //로그인시 맨위 창에 바로 로그아웃 버튼 생성
}else{
%><script>location.href='index.jsp?inc_contents=loginFail.jsp';</script><% //로그인시 맨위 창에 바로 로그아웃 버튼 생성
}

%>
</body>
</html>